package com.digigames;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class ContactActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);      
        setContentView(R.layout.contact);  
    }
    
    
    public void callus(View view) {
    	  try {
              Intent callIntent = new Intent(Intent.ACTION_CALL);
              callIntent.setData(Uri.parse("tel:18888748427"));
              startActivity(callIntent);
          } catch (ActivityNotFoundException e) {
              Log.e("Calling", "Call failed", e);
          }
	}
    
    public void emailus(View view) {
  	  try { 
  		//String[] recipients = new String[]{"support@triviaparties.com", "tim@triviaparties.com", "rob@triviaparties.com"};
  		String[] recipients = new String[]{"koheseena@hotmail.com"};
  		final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
  		/* Fill it with Data */
  		emailIntent.setType("plain/text");
  		emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients);
  		emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Contact From Android DigiGames");
  		emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");
  		startActivity(Intent.createChooser(emailIntent, "Send mail..."));
  		//finish();
  		
        } catch (ActivityNotFoundException e) {
            Log.e("sending email", "Email failed", e);
        }
	}
}
